import request from '@/utils/request'

// 查询出库单据主表列表
export function listChukumain(query) {
  return request({
    url: '/business/chukumain/list',
    method: 'get',
    params: query
  })
}

// 查询出库单据主表详细
export function getChukumain(id) {
  return request({
    url: '/business/chukumain/' + id,
    method: 'get'
  })
}
export function getChukumainBychukuFlag(chukuFlag) {
  return request({
    url: '/business/chukumain/getChukumainBychukuFlag/' + chukuFlag,
    method: 'get'
  })
}
//执行入库
export function zhixingChuku(danhao) {
  return request({
    url: '/business/chukumain/zhixingChuku/' + danhao,
    method: 'get'
  })
}
// 新增出库单据主表
export function addChukumain(data) {
  return request({
    url: '/business/chukumain',
    method: 'post',
    data: data
  })
}

// 修改出库单据主表
export function updateChukumain(data) {
  return request({
    url: '/business/chukumain',
    method: 'put',
    data: data
  })
}

// 删除出库单据主表
export function delChukumain(danhao) {
  return request({
    url: '/business/chukumain/' + danhao,
    method: 'delete'
  })
}
